﻿@inject IMessageService _message

<Space>
    <SpaceItem>
        <Button Type="ButtonType.Default" OnClick="Success">
            Success
        </Button>
    </SpaceItem>
    <SpaceItem>
        <Button Type="ButtonType.Default" OnClick="Error">
            Error
        </Button>
    </SpaceItem>
    <SpaceItem>
        <Button Type="ButtonType.Default" OnClick="Warning">
            Warning
        </Button>
    </SpaceItem>
</Space>

@code{

    private async Task Success()
    {
        _message.Success("This is a success message");
    }

    private async Task Error()
    {
        _message.Error("This is an error message");

    }

    private async Task Warning()
    {
        _message.Warning("This is a warning message");
    }

}
